import "reflect-metadata";
export function UseFilters(...filter: any) {
  return (
    target: object | Function,
    propertyKey?: string | symbol,
    descriptor?: any
  ) => {
    // 如果是方法装饰器 绑定到方法上
    if (descriptor) {
      Reflect.defineMetadata("filters", filter, descriptor.value);
    } else {
      //如果是类装饰器 绑定到类上
      Reflect.defineMetadata("filters", filter, target);
    }
  };
}
